package it.unisa.ingegneria.tdp.esercitazione5;

/**
 * Classe che rappresenta l'arco di un grafo
 * 
 */

public class MyEdge<T> extends MyItem<T> implements Edge<T> {
	
	private MyVertex<T> source;
	private MyVertex<T> drain;
	
	
	public MyEdge(MyVertex<T> source, MyVertex<T> drain) {
		super();
		this.source = source;
		this.drain = drain;
	}
	public MyVertex<T> getSource() {
		return source;
	}
	public void setSource(MyVertex<T> source) {
		this.source = source;
	}
	public MyVertex<T> getDrain() {
		return drain;
	}
	public void setDrain(MyVertex<T> drain) {
		this.drain = drain;
	}
	
	public String printDrain(){
		return drain.toString();
	}
	
	public String printSource(){
		return source.toString();
	}

	
}
